<?php
function dateTotxt($txt)
{
	$date=explode(" ",$txt);
	$order=explode("-",$date[0]);
	return $order[2]."/". $order[1]."/". $order[0]." ".$date[1];
}

function YmdHisTostmp($time){ // เวลาในรูปแบบ มาตรฐาน 2006-03-27 21:39:12
    $timeArr["Y"]= substr($time,2,2);
    $timeArr["M"]= substr($time,5,2);
    $timeArr["D"]= substr($time,8,2);
    $timeArr["h"]= substr($time,11,2);
    $timeArr["m"]= substr($time,14,2);
    $timeArr["s"]= substr($time,17,2);
 return  mktime($timeArr["h"], $timeArr["m"], $timeArr["s"], $timeArr["M"], $timeArr["D"], $timeArr["Y"]);
}

function dateNotZero($txt)
{
    $date=explode(" ",$txt);
    $order=explode("-",$date[0]);
    if( $order[2]=="00" || $order[1]=="00" || $order[0]=="0000"){
        return FALSE; 
    }else {
        return TRUE;
    }
}
